/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.edu.unal.bioingenium.kbmed.knowledge.mapping.vo;

/**
 *
 * @author Luis A Riveros
 */
public class ConceptIdentified implements Comparable<ConceptIdentified> {

    private String conceptId;
    private String descriptorId;
    private String term;
    private String category;
    private double score;

    /**
     * 
     */
    public ConceptIdentified() {
    }

    /**
     * 
     * @param conceptId
     * @param descriptorId
     * @param term
     * @param category
     * @param score
     */
    public ConceptIdentified(String conceptId, String descriptorId, String term, String category, double score) {
        this.conceptId = conceptId;
        this.descriptorId = descriptorId;
        this.term = term;
        this.category = category;
        this.score = score;
    }

    /**
     * 
     * @return
     */
    public String getCategory() {
        return category;
    }

    /**
     * 
     * @param category
     */
    public void setCategory(String category) {
        this.category = category;
    }

    /**
     * 
     * @return
     */
    public String getConceptId() {
        return conceptId;
    }

    /**
     * 
     * @param conceptId
     */
    public void setConceptId(String conceptId) {
        this.conceptId = conceptId;
    }

    /**
     * 
     * @return
     */
    public String getDescriptorId() {
        return descriptorId;
    }

    /**
     * 
     * @param descriptorId
     */
    public void setDescriptorId(String descriptorId) {
        this.descriptorId = descriptorId;
    }

    /**
     * 
     * @return
     */
    public String getTerm() {
        return term;
    }

    /**
     * 
     * @param term
     */
    public void setTerm(String term) {
        this.term = term;
    }

    /**
     * 
     * @return
     */
    public double getScore() {
        return score;
    }

    /**
     * 
     * @param score
     */
    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public int compareTo(ConceptIdentified o) {
        if (this.score > o.getScore()) {
            return -1;
        } else {
            return 1;
        }
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final ConceptIdentified other = (ConceptIdentified) obj;
        if ((this.conceptId == null) ? (other.conceptId != null) : !this.conceptId.equals(other.conceptId)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 23 * hash + (this.conceptId != null ? this.conceptId.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("conceptId:").append(conceptId).append("\t");
        builder.append("descriptorId:").append(descriptorId).append("\t");
        builder.append("category:").append(category).append("\t");
        builder.append("term:").append(term).append("\t");
        builder.append("score:").append(score);
        return builder.toString();
    }
}
